package org.kingkong.test;

import org.kingkong.framework.annotation.SessionBean;
import org.kingkong.framework.selection.SelectionMode;
import org.kingkong.framework.web.Gridable;

@SessionBean
public class LoginController extends
        Gridable<UserRow> {

	private String helloworld = "helloworld";

	public LoginController() {
		super();
		System.out.println(SelectionMode.SINGLE);
		for (int i = 0; i < 5; i++) {
			final UserRow user = new UserRow();
			user.setFirstName("fisrt name " + i);
			user.setId(i);
			getList().add(user);
		}
	}

	public void affiche() {
		for (int i = 0; i < getSelection().length; i++) {
			System.out.println(getSelection()[i]
			        .toString());
		}
	}

	public String getHelloworld() {
		return helloworld;
	}

	public void setHelloworld(String helloworld) {
		this.helloworld = helloworld;
	}

}
